import { get, post } from '../http';

/**
 * 流转卡拼缸排产
 *   getInfoByMachine 查询
 *   getShiftMachine  移动
 *   drawMachine 提取流转卡
 *   cancelSchedul 取消排缸
 *   finallyOver  染色完成
 *   dyeStop  停止/ 取消停止
 *   dyeChangeMachine 生产调缸设置
 *   dyeTogether 拼缸排产
 */

export function machine(){
    return {
        getInfoByMachine:(params:any) => {
            return post({
                url:'/aps/circulatCard/getInfoByMachine',
                data:params
            })
        },
        getShiftMachine:(params:any) => {
            return post({
                url:'/aps/circulatCard/getInfoByMachine',
                data:params
            })
        },
        drawMachine:(params:any) => {
            return post({
                url:'/aps/circulatCard/getPage',
                data:params
            })
        },
        cancelSchedul:(params:any) => {
            return post({
                url:'/aps/schedulOrder/updateState',
                data:params
            })
        },
        finallyOver:(params:any) => {
            return post({
                url:'/aps/circulatCard/dyeFinally',
                data:params
            })
        },

        dyeStop:(params:any) => {
            return post({
                url:'/aps/circulatCard/dyeStop',
                data:params
            })
        },
        dyeChangeMachine:(params:any) => {
            return post({
                url:'/aps/circulatCard/dyeChangeMachine',
                data:params
            })
        },

        dyeTogether:(params:any) => {
            return post({
                url:"/aps/circulatCard/dyeSchedulTogether",
                data:params
            })
        }

    }
}



export function otherMachineFn(){
    return {
        //获取染色类型列表
        getDyeSelect:(params:any) => { 
            return post({
                url:"/aps/machinType/getDropValue",
                data:params
            })
        },
        //获取 设备列表
        getFieldList:(params:any) => { 
            return post({
                url:'/pmd/controlMachine/getFieldValue',
                data:params
            })
        }
    }
}